Implement AuthenticationTagMismatchException exception - #75160
Conversation
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones Issue DetailsThis introduces a new Previously for Android, we were assuming anything mean "auth tag mismatch". This changes the native shim to properly catch and handle the Android AEADBadTagException.
|
|
Draft to get a run through CI. Android is very unhappy in my local dev. |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The x86 and x64 Android legs passed. The ARM64 seemed to crash. I also cannot get the ARM64 tests to run locally, but that's true even on Marking as ready for review, then. |
|
@jkoritzinsky can you weigh in on the JNI parts? |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@bartonjs @jkoritzinsky I am having a hard time parsing the results of the Android test runs. I don't see anything in the test results that look like a failure as a result from this change. Can either of you help me confirm that and this is okay to merge? |
|
It is related: Taken from one of the MonoRunner logs here |
…l_jni.c Co-authored-by: Filip Navara <filip.navara@gmail.com>
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This introduces a new
AuthenticationTagMismatchExceptionfor AEAD ciphers to throw during decryption when the authentication tag produces a mismatch.Previously for Android, we were assuming any failure meant "auth tag mismatch". This changes the native shim to properly catch and handle the Android AEADBadTagException.
Closes #67082